package com.example.beaven.news.model.bean;

import com.google.gson.annotations.SerializedName;

/**
 * @author : Beaven
 * @time : 2017/12/9 14:10
 */

public class ApiResponse<T> {

  private String reason;
  @SerializedName("error_code")
  private int errorCode;
  private T result;

  public String getReason() {
    return reason;
  }

  public int getCode() {
    return errorCode;
  }

  public T getResult() {
    return result;
  }

  public boolean isSuccess() {
    return errorCode == 0;
  }
}
